package com.bmlstrategys
{
	import com.strategy.IBML;
	import com.utils.Utils;
	
	import flash.utils.ByteArray;
	
	public class CPETInfo extends BMLBase implements IBML
	{
		public function CPETInfo(data:ByteArray)
		{
			super(data);
		}
		
		public function bmlstrategyxml():XML
		{
			//把头读掉
			var num:int = Utils.readHead(bmlData);
			var index:int=0;
			var xmlData:XML = new XML();
			xmlData = <root/>;
			
			while(index<num){
				xmlData.appendChild(<pets/>);
				xmlData.pets[index].@type = bmlData.readUnsignedInt();
				var j:uint=0;
				while (j < 7)
				{
					xmlData.pets[index].@["aptitude"+j] = bmlData.readUnsignedInt();
					j++;
				}
				
				index++;
			}
			return xmlData;
		}
	}
}